home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 4758 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.6 KB

  1. Path: info.uah.edu!oreo!gbacon
  2. From: gbacon@oreo (Greg Bacon)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Unfamiliar DOS functions, help please
  5. Date: 6 Feb 1996 21:06:08 GMT
  6. Organization: The University of Alabama in Huntsville
  7. Message-ID: <4f8fs0$nnk@info.uah.edu>
  8. References: <duffyfr-0502962100040001@134.174.41.144>
  9. Reply-To: gbacon@CS.UAH.Edu
  10. NNTP-Posting-Host: oreo.aspire.cs.uah.edu
  11. X-Newsreader: TIN [version 1.2 PL2]
  12.  
  13. Frank H. Duffy, MD (duffyfr@a1.tch.harvard.edu) wrote:
  14. : Am attempting to port software coded in Microsoft C for DOS
  15. : over to Unix (Linux using gcc). Don't have access to needed
  16. : manuals.
  17.  
  18. :    The following code interrupts a data loop with ESC key:
  19.  
  20. :    if(kbhit()) {
  21. :      if((Key = getch()) == 0)
  22. :        Key = getch() + 0x100;
  23. :      if(Key == 27)
  24. :        return;
  25. :    }
  26.  
  27. :    Is there a simple way to emulate kbhit in gcc in unix environment?
  28. :    Is there a simple way to unblock read of stdin in unix?
  29. :    
  30. : Thanks for your help. Please respond via e-mail (address below).
  31.  
  32. : Frank
  33. : ----------------------------------------------------------------
  34. : Frank H. Duffy, MD            e-mail: duffyfr@a1.tch.harvard.edu
  35. : Neurlogy                      phone: (617)-355-7919
  36. : Childrens Hospital &          fax:  (617)-355-7230
  37. : Harvard Medical School        ham radio: k1moq
  38. : 300 Longwood Ave
  39. : Boston, MA 02115 USA
  40.  
  41. [loud Homer-esque 'doh!'... sorry about that last one]
  42.  
  43. As the smoke clears, your answer manifests itself in the form of six
  44. letters: RTFFAQ
  45.  
  46. Greg
  47. --
  48. Greg Bacon <gbacon@cs.uah.edu>
  49. University of Alabama in Huntsville
  50. CS Department Systems Support Team
  51.